package com.lz.football.module.main.view
{
	import com.common.utils.DisplayObjectUtil;
	import com.common.utils.Reflection;
	import com.global.GlobalDef;
	import com.greensock.TweenLite;
	import com.liangzhong.constants.ModulePanelTypeConst;
	import com.liangzhong.events.AppEventDispatcher;
	import com.liangzhong.events.MainEvent;
	import com.liangzhong.events.NotifierEvent;
	import com.liangzhong.manager.SoundManager;
	import com.liangzhong.model.AppData;
	
	import flash.display.Bitmap;
	import flash.display.BitmapData;
	import flash.display.DisplayObject;
	import flash.display.MovieClip;
	import flash.display.SimpleButton;
	import flash.events.Event;
	import flash.events.MouseEvent;
	import flash.geom.Point;
	
	import lz.controls.CompGlobalDef;
	import lz.controls.core.UIComponent;
	import lz.controls.managers.PopUpManager;

	/**
	 *主界面视图 
	 * @author lake
	 * 
	 */	
	public class MainView extends UIComponent implements IMainView
	{
		/**
		 * 左上方显示mc
		 */		
		private var leftTopMc 			:MovieClip;
		/**
		 * 顶上显示
		 */		
		private var topMc 				:MovieClip;
		/**
		 * 右上显示
		 */		
		private var rightTopMc 		:MovieClip;
		/**
		 * 底部功能按钮显示
		 */		
		private var bottomMc 			:MovieClip;
		/**
		 *背景 
		 */		
		private var bgMc				:MovieClip;
		/**
		 *聊天面板 
		 */		
		private var chatPanel			:DisplayObject;
		/**
		 *其他模块大背景层 
		 */		
		private var moduleBgLayer		:MovieClip;
		/**
		 * 是否开始拖动
		 */		
		private var isStartDrag		:Boolean = false;
		/**
		 * 开始拖动X
		 */		
		private var startDragX			:Number = 0;
		/**
		 * 开始拖动Y
		 */		
		private var startDragY			:Number = 0;
		/**
		 *俱乐部 
		 */		
		public static  var clubBtn			:SimpleButton;
		/**
		 *场景俱乐部 
		 */		
		private var clubSBtn				:SimpleButton;
		/**
		 *球员中心 
		 */		
		public static var playerBtn		:SimpleButton;
		/**
		 *场景球员中心 
		 */		
		private var playerSBtn				:SimpleButton;
		/**
		 *球员探索 
		 */		
		public static var playerSearchBtn	:SimpleButton;
		/**
		 *场景球员探索  
		 */		
		private var playerSearchSBtn		:SimpleButton;
		/**
		 *球场 
		 */		
		public static var stadiumBtn		:SimpleButton;
		/**
		 *场景球场   
		 */		
		private var stadiumSBtn			:SimpleButton;
		/**
		 *科技馆 
		 */		
		public static var techBtn			:SimpleButton;
		/**
		 *场景科技馆   
		 */		
		private var techSBtn				:SimpleButton;
		/**
		 *仓库 
		 */		
		public static var bagBtn			:SimpleButton;
		/**
		 *场景仓库   
		 */		
		private var bagSBtn				:SimpleButton;
		/**
		 *酒吧 
		 */		
		private var saloonBtn				:SimpleButton;
		/**
		 *商城 
		 */		
		public static var shopBtn			:SimpleButton;
		/**
		 *场景商城   
		 */		
		private var shopSBtn				:SimpleButton;
		/**
		 *场景青训营 
		 */		
		private var youngTrainSBtn			:SimpleButton;
		/**
		 *训练营 
		 */		
		private var trainBtn				:SimpleButton;
		/**
		 * 场景训练营
		 */		
		private var trainSBtn				:SimpleButton;
		/**
		 *用户信息 
		 */		
		private var userInfoPanel		:UserInfoPanel;
		/**
		 *右边面板 
		 */		
		private var rightPanel			:RightPanel;
		/**
		 *顶上面板 
		 */		
		private var topPanel			:TopPanel;
		/**
		 *功能按钮图标数组 
		 */		
		private var funcBtns			:Array;
		/**
		 *背景宽高 
		 */		
		private var bgWidth			:Number = 1600;
		private var bgHeight			:Number = 1200;
		/**
		 * 背景层索引
		 */		
		private var bgChildIndex		:int = 0;
		/**
		 *设置面板 
		 */		
		private var settingPanel		:SysSettingPanel;
		
		public function MainView()
		{
			super();
		}
		/**
		 * 初始化
		 * @param view
		 * 
		 */		
		public function initUI(view:Object=null):void
		{
			_symbolSkin = Reflection.createInstance("com.football.MainUI");
			if(_symbolSkin == null)
			{
				return;
			}
			leftTopMc 		= _symbolSkin.leftTopMc;
			leftTopMc.cacheAsBitmap = true;
			topMc 			= _symbolSkin.topMc;
			topMc.cacheAsBitmap = true;
			rightTopMc 		= _symbolSkin.rightTopMc;
			rightTopMc.cacheAsBitmap = true;
			bottomMc 		= _symbolSkin.bottomMc;
			bottomMc.cacheAsBitmap = true;
			bgMc 			= _symbolSkin.bgMc;
			//bgMc.cacheAsBitmap = true;
			bgChildIndex = _symbolSkin.getChildIndex(bgMc);
			
			clubSBtn 			= bgMc.bgMc.clubSBtn;
			clubSBtn.cacheAsBitmap = true;
			
			playerSBtn 			= bgMc.bgMc.playerSBtn;
			playerSBtn.cacheAsBitmap = true;
			
			playerSearchSBtn 	= bgMc.bgMc.playerSearchSBtn;
			playerSearchSBtn.cacheAsBitmap = true;
			
			stadiumSBtn 		= bgMc.bgMc.stadiumSBtn;
			stadiumSBtn.cacheAsBitmap = true;
			
			techSBtn 			= bgMc.bgMc.techSBtn;
			techSBtn.cacheAsBitmap = true;
			
			bagSBtn 			= bgMc.bgMc.bagSBtn;
			bagSBtn.cacheAsBitmap = true;
			
			shopSBtn 			= bgMc.bgMc.shopSBtn;
			shopSBtn.cacheAsBitmap = true;
			
			trainSBtn 			= bgMc.bgMc.trainSBtn;
			trainSBtn.cacheAsBitmap = true;
			
			youngTrainSBtn 		= bgMc.bgMc.youngTrainSBtn;
			youngTrainSBtn.cacheAsBitmap = true;
			
			trainSBtn.mouseEnabled = true;
			youngTrainSBtn.mouseEnabled = false;
			
			bgMc.bgMc.bgImgMc.mouseEnabled = false;
			bgMc.bgMc.bgImgMc.mouseChildren = false;
			bgMc.wMC.mouseEnabled = false;
			bgMc.wMC.mouseChildren = false;
			bgMc.wMC1.mouseEnabled = false;
			bgMc.wMC1.mouseChildren = false;
			bgMc.wMC2.mouseEnabled = false;
			bgMc.wMC2.mouseChildren = false;
			bgMc.wMC3.mouseEnabled = false;
			bgMc.wMC3.mouseChildren = false;
			bgMc.bgMc.carMMc.mouseEnabled = false;
			bgMc.bgMc.carMMc.mouseChildren = false;
			//bgMc.bgMc.bgImgMc.cacheAsBitmap = true;
			//bgMc.wMC.cacheAsBitmap = true;
			//bgMc.wMC1.cacheAsBitmap = true;
			//bgMc.wMC2.cacheAsBitmap = true;
			bgMc.wMC.parent.removeChild(bgMc.wMC);
			bgMc.wMC2.parent.removeChild(bgMc.wMC2);
			bgMc.wMC3.parent.removeChild(bgMc.wMC3);
			//bgMc.bgMc.parent.removeChild(bgMc.bgMc);
			//bgMc.parent.removeChild(bgMc);
			bgMc.bgMc.carMMc.parent.removeChild(bgMc.bgMc.carMMc);
			
			moduleBgLayer	= _symbolSkin.moduleBgLayer;
			clubBtn			= bottomMc.clubBtn;
			playerBtn		= bottomMc.playerBtn;
			playerSearchBtn	= bottomMc.playerSearchBtn;
			stadiumBtn		= bottomMc.stadiumBtn;
			techBtn			= bottomMc.techBtn;
			bagBtn			= bottomMc.bagBtn;
			saloonBtn		= bottomMc.saloonBtn;
			shopBtn			= bottomMc.shopBtn;
			trainBtn		= bottomMc.trainBtn;
			funcBtns		= [clubBtn,bagBtn,stadiumBtn,playerSearchBtn,playerBtn,techBtn,shopBtn];
			this.addChild(_symbolSkin);
			userInfoPanel = new UserInfoPanel();
			userInfoPanel.initUI(leftTopMc);
			rightPanel = new RightPanel();
			rightPanel.initUI(rightTopMc);
			topPanel = new TopPanel();
			topPanel.initUI(topMc);
			resize();
			addEvtListener();
			//浅入
			fadeIn();
		}
		/**
		 *浅入 
		 * 
		 */		
		override public function fadeIn():void
		{
			_symbolSkin.alpha = .8;
			TweenLite.to(_symbolSkin,fadeInDuration,{alpha:1});
		}
		/**
		 *大小重置 
		 */		
		private function resize():void
		{
			GlobalDef.StageWidth = GlobalDef.GameStage.stageWidth;
			GlobalDef.StageHeight = GlobalDef.GameStage.stageHeight;
			
			leftTopMc.x = -13;
			leftTopMc.y = -9;
			topMc.x = (GlobalDef.GameStage.stageWidth - 410);
			topMc.y = 15;
			bottomMc.x = GlobalDef.GameStage.stageWidth - 626;
			bottomMc.y = GlobalDef.GameStage.stageHeight - 122;
			rightTopMc.x = GlobalDef.GameStage.stageWidth - 56;
			rightTopMc.y = 83;
			if(chatPanel)
			{
				chatPanel.x = 2;
				chatPanel.y = GlobalDef.GameStage.stageHeight - chatPanel.height;
			}
			if(moduleBgLayer.numChildren)
			{
				moduleBgLayer.x = (GlobalDef.GameStage.stageWidth - moduleBgLayer.width)/2;
				moduleBgLayer.y = (GlobalDef.GameStage.stageHeight - moduleBgLayer.height)/2;
			}
			bgMc.x = (GlobalDef.GameStage.stageWidth - bgWidth)/2;
			bgMc.y = (GlobalDef.GameStage.stageHeight - bgHeight)/2;
			CompGlobalDef.BagPoint = bagBtn.localToGlobal(new Point(0,0));
		}
		/**
		 * 
		 * 添加事件
		 */		
		public function addEvtListener():void
		{
			GlobalDef.GameStage.addEventListener(Event.RESIZE,onResizeHandler,false,30);
			bgMc.addEventListener(MouseEvent.MOUSE_DOWN,onBgDownHandler);
			bgMc.addEventListener(MouseEvent.MOUSE_UP,onBgUpHandler);
			clubBtn.addEventListener(MouseEvent.CLICK,onClickFuncHandler);
			playerBtn.addEventListener(MouseEvent.CLICK,onClickFuncHandler);
			bagBtn.addEventListener(MouseEvent.CLICK,onClickFuncHandler);
			//youngTrainBtn.addEventListener(MouseEvent.CLICK,onClickFuncHandler);
			//saloonBtn.addEventListener(MouseEvent.CLICK,onClickFuncHandler);
			//trainBtn.addEventListener(MouseEvent.CLICK,onClickFuncHandler);
			techBtn.addEventListener(MouseEvent.CLICK,onClickFuncHandler);
			stadiumBtn.addEventListener(MouseEvent.CLICK,onClickFuncHandler);
			playerSearchBtn.addEventListener(MouseEvent.CLICK,onClickFuncHandler);
			shopBtn.addEventListener(MouseEvent.CLICK,onClickFuncHandler);
			AppEventDispatcher.getInstance().addEventListener(NotifierEvent.BASE_INFO_CHANGE,onClubInfoChangeHandler);
			
			clubSBtn.addEventListener(MouseEvent.CLICK,onClickFuncHandler);
			playerSBtn.addEventListener(MouseEvent.CLICK,onClickFuncHandler);
			playerSearchSBtn.addEventListener(MouseEvent.CLICK,onClickFuncHandler);
			stadiumSBtn.addEventListener(MouseEvent.CLICK,onClickFuncHandler);
			techSBtn.addEventListener(MouseEvent.CLICK,onClickFuncHandler);
			bagSBtn.addEventListener(MouseEvent.CLICK,onClickFuncHandler);
			shopSBtn.addEventListener(MouseEvent.CLICK,onClickFuncHandler);
			
			rightPanel.settingBtn.addEventListener(MouseEvent.CLICK,onSettingHandler);
			trainBtn.addEventListener(MouseEvent.CLICK,onClickFuncHandler);
			trainSBtn.addEventListener(MouseEvent.CLICK,onClickFuncHandler);
		}
		/**
		 *捕获点击功能 
		 * @param e
		 * 
		 */		
		private function onClickFuncHandler(e :MouseEvent):void
		{
			switch(e.target)
			{
				case clubBtn://俱乐部
				case clubSBtn:
				{
					AppEventDispatcher.getInstance().dispatchEvent(new MainEvent(MainEvent.Open_Club_View));
					break;
				}
				case playerBtn://球员中心
				case playerSBtn:
				{
					AppEventDispatcher.getInstance().dispatchEvent(new MainEvent(MainEvent.OPEN_PLAYERCENTER));
					break;
				}
				case bagBtn://背包
				case bagSBtn:
				{
					AppEventDispatcher.getInstance().dispatchEvent(new MainEvent(MainEvent.Open_Bag_View));
					break;
				}
				case saloonBtn://酒吧
				{
					AppEventDispatcher.getInstance().dispatchEvent(new MainEvent(MainEvent.Open_WineBar_View));
					break;
				}
				case techBtn://科技馆
				case techSBtn:
				{
					AppEventDispatcher.getInstance().dispatchEvent(new MainEvent(MainEvent.Open_TechBar_View));
					break;
				}
				case stadiumBtn://球场
				case stadiumSBtn:
				{
					AppEventDispatcher.getInstance().dispatchEvent(new MainEvent(MainEvent.OPEN_COURT_VIEW));
					break;
				}
				case playerSearchBtn://探索
				case playerSearchSBtn:
				{
					AppEventDispatcher.getInstance().dispatchEvent(new MainEvent(MainEvent.OPEN_EXPLORE_VIEW));
					break;
				}
				case shopBtn://商城
				case shopSBtn:
				{
					AppEventDispatcher.getInstance().dispatchEvent(new MainEvent(MainEvent.Open_Shop_View));
					break;
				}
				case trainBtn://训练场
				case trainSBtn:
				{
					AppEventDispatcher.getInstance().dispatchEvent(new MainEvent(MainEvent.Open_Train_View));
					break;
				}
					
			}
		}
		/**
		 *舞台大小改变 
		 * @param e
		 * 
		 */		
		private function onResizeHandler(e :Event):void
		{
			resize();
			//弹出框遮罩变化
			var msp :DisplayObject;
			var scount:int;
			for(var key :* in PopUpManager.markBgMap)
			{
				msp = PopUpManager.markBgMap[key];
				if(msp)
				{
					msp.width = GlobalDef.GameStage.stageWidth;
					msp.height = GlobalDef.GameStage.stageHeight;
				}
				scount ++;
			}
			trace("PopUpManager.markBgMap count=",scount);
		}
		/**
		 *背景鼠标按下 
		 * @param e
		 */		
		private function onBgDownHandler(e:MouseEvent):void
		{
			isStartDrag = true;
			startDragX = e.stageX;
			startDragY = e.stageY;
		}
		/**
		 *背景鼠标松开
		 * @param e
		 * 
		 */		
		private function onBgUpHandler(e:MouseEvent):void
		{
			if(isStartDrag)
			{
				isStartDrag = false;
				var targetStageX :Number = e.stageX;
				var targetStageY :Number = e.stageY;
				var rapX :Number = targetStageX - startDragX;
				var rapY :Number = targetStageY - startDragY;
				if(bgMc.x <= 0)
				{
					bgMc.x += rapX;
					if(bgMc.x > 0)
					{
						bgMc.x = 0;
					}
					if((Math.abs(bgMc.x) + GlobalDef.GameStage.stageWidth)>bgWidth)
					{
						bgMc.x = GlobalDef.GameStage.stageWidth - bgWidth;
					}
				}
				if(bgMc.y <= 0)
				{
					bgMc.y += rapY;
					if(bgMc.y > 0)
					{
						bgMc.y = 0;
					}
					if((Math.abs(bgMc.y) + GlobalDef.GameStage.stageHeight)>bgHeight)
					{
						bgMc.y = GlobalDef.GameStage.stageHeight - bgHeight;
					}
				}
			}
		}
		/**
		 *俱乐部信息改变  主要经验 等级 
		 * @param e
		 * 
		 */		
		private function onClubInfoChangeHandler(e:Event):void
		{
			var lev :int = AppData.getInstance().clubDatamanager.clubInfo.level;
			var guideStep :int = AppData.getInstance().clubDatamanager.guideStep;
			var index :int = 2;
			switch(lev)
			{
				case 1:
				{
					index = 2;
					break;
				}
				case 2:
				{
					index = 3;
					break;
				}
				case 3:
				case 4:
				case 5:
				{
					index = 6;
					break;
				}
				default:
				{
					index = 7;
				}
			}
			showFuncBtns(index);
			RightPanel.mailMc.visible = (lev < 4)?false:true;
			rightPanel.settingBtn.visible = (lev < 4)?false:true;
			RightPanel.friendMc.visible = (lev < 13)?false:true;
			rightPanel.competeBtn.visible = (lev < 15)?false:true;
			TopPanel.signBtn.visible = (lev < 4)?false:true;
			TopPanel.vipBtn.visible = (lev < 5)?false:true;
			TopPanel.levelBtn.visible = (lev < 9)?false:true;
			TopPanel.competeBtn.visible = (lev < 15)?false:true;
			TopPanel.livelyBtn.visible = (lev < 20)?false:true;
			
			TopPanel.starBtn.visible = (guideStep<2)?false:true;
			playerSearchBtn.visible = (guideStep<3)?false:true;
			playerBtn.visible = (guideStep<5)?false:true;
			techBtn.visible = (guideStep<6)?false:true;
			if(lev < 4)
			{
				bgMc.mouseChildren = false;
				bgMc.mouseEnabled = false;
			}
			else
			{
				bgMc.mouseChildren = true;
				bgMc.mouseEnabled = true;
			}
			if(lev < 6)
			{
				shopBtn.visible = false;
			}
			else
			{
				shopBtn.visible = true;
			}
			if(lev < 10)
			{
				trainBtn.visible = false;
			}
			else
			{
				trainBtn.visible = true;
			}
			if(AppData.getInstance().clubDatamanager.clubInfo.firstpay == 1)
			{
				topPanel.firstChargeBtn.visible = false;
			}
			else
			{
				topPanel.firstChargeBtn.visible = true;
			}
			if(AppData.getInstance().clubDatamanager.clubInfo.seven == 2)
			{
				TopPanel.starBtn.visible = false;
			}
			else
			{
				TopPanel.starBtn.visible = true;
			}
			if(lev > 20)
			{
				AppEventDispatcher.getInstance().removeEventListener(NotifierEvent.BASE_INFO_CHANGE,onClubInfoChangeHandler);
			}
			if(guideStep >= 30)
			{
				bgMc.mouseChildren = true;
				bgMc.mouseEnabled = true;
				clubBtn.mouseEnabled = true;
				bagBtn.mouseEnabled = true;
				shopBtn.visible = true;
				shopBtn.mouseEnabled = true;
				trainBtn.visible = true;
				trainBtn.mouseEnabled = true;
				techBtn.visible = true;
				techBtn.mouseEnabled = true;
				playerBtn.visible = true;
				playerBtn.mouseEnabled = true;
				playerSearchBtn.visible = true;
				playerSearchBtn.mouseEnabled = true;
				TopPanel.levelBtn.visible = true;
				rightPanel.settingBtn.visible = true;
				RightPanel.mailMc.visible = true;
				stadiumBtn.visible = true;
				stadiumBtn.mouseEnabled = true;
				TopPanel.vipBtn.visible = true;
				TopPanel.signBtn.visible = true;
				TopPanel.starBtn.visible = true;
			}
			topPanel.refreshBtns();
			TopPanel.resizeBtnPos();
			RightPanel.resizeBtnPos();
		}
		/**
		 *显示功能按钮 
		 * @param index 显示到第几个
		 * 
		 */		
		private function showFuncBtns(index :int):void
		{
			var fbtn :DisplayObject;
			for(var i :int = 0;i<index;i++)
			{
				fbtn = funcBtns[i];
				fbtn.visible = true;
			}
			for(var j :int = i;j < 7;j++)
			{
				fbtn = funcBtns[j];
				fbtn.visible = false;
			}
		}
		/**
		 * 设置 
		 * @param e
		 * 
		 */		
		private function onSettingHandler(e:MouseEvent):void
		{
			if(settingPanel == null)
			{
				return ;
			}
			settingPanel.dragEnabled = true;
			PopUpManager.addPopUp(settingPanel,GlobalDef.GameStage,GlobalDef.GameStage.stageWidth,GlobalDef.GameStage.stageWidth,false);
		}
		/**
		 * 
		 * 删除事件
		 */		
		public function removeEvtListener():void
		{
		}
		/**
		 * 销毁
		 * 
		 */		
		public function destroyView():void
		{
		}
		
		public function showType($obj:Object):void
		{
		}
		/**
		 * 添加其他模块背景
		 * @param $displayObj
		 * 
		 */		
		public function addDisplayObj($displayObj:DisplayObject):void
		{
			if($displayObj)
			{
				moduleBgLayer.addChild($displayObj);
				leftTopMc.visible 	= false;
				topMc.visible		= false;
				rightTopMc.visible	= false;
				bottomMc.visible 	= false;
				bgMc.visible		= false;
				if(bgMc.parent)
				{
					bgMc.parent.removeChild(bgMc);
				}
			}
		}
		/**
		 * 删除其他模块背景
		 * @param $displayObj
		 * 
		 */		
		public function removeDisplayObj($displayObj:DisplayObject=null):void
		{
			DisplayObjectUtil.removeAllChildren(moduleBgLayer);
			leftTopMc.visible 	= true;
			topMc.visible		= true;
			rightTopMc.visible	= true;
			bottomMc.visible 	= true;
			bgMc.visible		= true;
			if(_symbolSkin)
			{
				_symbolSkin.addChildAt(bgMc,bgChildIndex);
			}
		}
		/**
		 *设置聊天面板 
		 * @param panel
		 * 
		 */		
		public function setChatPanel(panel :*):void
		{
			chatPanel = panel;
			if(chatPanel)
			{
				_symbolSkin.addChildAt(chatPanel,3);
			}
			if(AppData.getInstance().user.isGuideing)
			{
				chatPanel.visible = false;
			}
			resize();
		}
		public function get type():String
		{
			return null;
		}
		
		public function set type($str:String):void
		{
//			if($str == ModulePanelTypeConst.WINEBAR)
//			{
//				leftTopMc.visible 	= true;
//			}
			switch($str)
			{
				case ModulePanelTypeConst.WINEBAR:
//					leftTopMc.visible 	= true;
//					break;
				case ModulePanelTypeConst.COMPETE:
					leftTopMc.visible 	= true;
					break;
			}
		}
		
		public function showTaskFadeOut():void
		{
		}
		
		public function closeTaskFadeIn():void
		{
		}
		/**
		 *显示主界面UI 
		 * 
		 */		
		public function showMainUI():void
		{
			leftTopMc.visible 	= true;
			topMc.visible		= true;
			rightTopMc.visible	= true;
			bottomMc.visible 	= true;
			bgMc.visible 		= true;
			if(chatPanel)
			{
				chatPanel.visible = true;
			}
		}
		/**
		 * 
		 * 隐藏主界面UI
		 */		
		public function unShowMainUI():void
		{
			leftTopMc.visible 	= false;
			topMc.visible		= false;
			rightTopMc.visible	= false;
			bottomMc.visible 	= false;
			//bgMc.visible 		= false;
			if(chatPanel)
			{
				chatPanel.visible = false;
			}
		}
		
		public function showUpAndDownUI():void
		{
		}
		
		public function unShowUpAndDownUI():void
		{
		}
		/**
		 *显示效果 
		 * 
		 */		
		public function showAnimate():void
		{
			var wuBitmap :Bitmap;
			var wbitdata :BitmapData = Reflection.createInstance("com.football.main.effect.Wu1") as BitmapData;
			if(wbitdata)
			{
				wuBitmap = new Bitmap(wbitdata);
				bgMc.wMC.addChild(wuBitmap);
			}
			wbitdata  = Reflection.createInstance("com.football.main.effect.Wu2") as BitmapData;
			if(wbitdata)
			{
				wuBitmap = new Bitmap(wbitdata);
				bgMc.wMC1.addChild(wuBitmap);
			}
			settingPanel = new SysSettingPanel();
			settingPanel.initUI();
		}
		/**
		 *显示 圣诞雪景
		 */		
		public function showChristmasEf():void
		{
			var upSnowMc :MovieClip = Reflection.createInstance("com.football.main.effect.snowUp");
			if(upSnowMc && bgMc.bgMc)
			{
				bgMc.bgMc.addChild(upSnowMc);
				upSnowMc.mouseChildren = false;
				upSnowMc.mouseEnabled = false;
			}
			var downSnowMc :MovieClip = Reflection.createInstance("com.football.main.effect.snowDown");
			if(downSnowMc && bgMc.bgMc)
			{
				bgMc.bgMc.addChildAt(downSnowMc,1);
				downSnowMc.mouseChildren = false;
				downSnowMc.mouseEnabled = false;
			}
			var main_bgBtm :BitmapData = Reflection.createInstance("com.lz.main.res.mainBg_btm");
			if(main_bgBtm)
			{
				DisplayObjectUtil.removeAllChildren(bgMc.bgMc.bgImgMc);
				bgMc.bgMc.bgImgMc.addChild(new Bitmap(main_bgBtm));
			}
		}
		/**
		 *设置在线奖励时间 
		 * 
		 */
		public function showOnlineTime():void
		{
			topPanel.showOnlineTime();
		}
		public function unShownAnimate():void
		{
		}
		
		public function guideSetFinish():void
		{
		}
		
		public function showNormalUI():void
		{
		}
		
		public function showTourMatch():void
		{
		}
		
		public function showFriendListPanel():void
		{
		}
	}
}